package com.isoftstone.common.service;


import com.isoftstone.bank.entity.PAd;
import com.isoftstone.common.Page;
import com.isoftstone.common.entity.SysRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface ISysRoleService {
    SysRole getRoleById(String roleId)throws Exception;

    SysRole getRoleByCode(String roleCode)throws Exception;

    List<SysRole> getRolelistPage(Page page) throws Exception;
    
    List<SysRole> getRole() throws Exception;


    public void saveRole(SysRole role)throws Exception;

    public void updateRole(SysRole role)throws Exception;

    /**批量删除
     * @param roleId
     * @throws Exception
     *
     */
    @Transactional
    public void deleteRole(String roleId)throws Exception;

    /**
     * 根据comCode查询sysRole
     *
     */
    List<SysRole> getSysRole(@Param("comCode") String comCode) throws Exception;

    List<SysRole> getCompanyRoles(String empCode, String comCode) throws Exception;
    //根据商户id跟用户id查找角色
    SysRole getRoleByCorpIdAndUserId(String corpId, String userId) throws Exception;
        //根据商户编号和角色id修改
    void updateRoleByidAndcorpId(int roleId, String corpId) throws Exception;
        //根据roleid查询上级角色id
    String getParentRoleIdByRoleid(String roleId) throws Exception;

    //分页查找银行端角色
    List<SysRole> getBankRolePage(Page page);

    List<SysRole> getRolelist(String corpId)throws Exception;

    String getRoleNameByRoleNameandCorpId(String roleName, String corpId)throws Exception;

    List<SysRole> getBankRoleTree();
}
